namespace go admin_product_material_group
include "error_code.thrift"

struct MaterialGroup {
    1: i64 ID(api.body="id")
    2: string Name(api.body="name")
}

struct CreateMaterialGroupRequest {
    1: string Name (api.body='name')
}

struct CreateMaterialGroupResponse {
    1: error_code.ErrorCode Code (api.body='code')
}

struct GetMaterialGroupListRequest {
}

struct GetMaterialGroupListResponse {
    1: error_code.ErrorCode Code (api.body='code')
    2: list<MaterialGroup> Data (api.body='data')
}

struct DeleteMaterialGroupRequest {
    1: list<i64> IDs (api.body="ids")
}

struct DeleteMaterialGroupResponse {
    1: error_code.ErrorCode Code (api.body='code')
}

struct UpdateMaterialGroupRequest {
    1: i64 ID (api.query="id")
    2: string Name (api.body='name')
}

struct UpdateMaterialGroupResponse {
    1: error_code.ErrorCode Code (api.body='code')
}
